My guess is that there is a stray '\r' in there which might be why it is different on windows and linux. A carriage return will cause the cursor to go to the start of the line, which would be why the "<--" is at the start of the line instead of after the string.
How are you reading the data into the Database array? That's likely where the problem (or at least the solution) is.

